package com.xhtranslate.common.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @author liuxuhuang
 * @version 1.0
 * @package com.xhtranslate.common.dto
 * @date 2022/11/2 20:48:16
 * @description
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TextFormDTO implements Serializable {
    private static final long serialVersionUID = -1242493306307174690L;
    @NotBlank(message = "翻译平台不能为空")
    private String platform;
    @NotBlank(message = "翻译源语言不能为空")
    private String from;
    @NotBlank(message = "翻译目标语言不能为空")
    private String to;
    @NotBlank(message = "翻译内容不能为空")
    @Max(value = 2000, message = "内容过多")
    private String context;
}
